package com.ruitu.mall_98_2.mvp.contract;

import com.beanu.arad.base.BaseModel;
import com.beanu.arad.base.BasePresenter;
import com.beanu.arad.base.BaseView;
import com.ruitu.router_module.bean.api.BaseResult;
import com.ruitu.router_module.bean.mine.Coupon;
import com.ruitu.router_module.bean.order.CommitOrder;
import com.ruitu.router_module.bean.order.ConfirOrder;

import java.util.List;

import rx.Observable;

public interface ByNowFillInOrderContract {
    interface Model extends BaseModel {
        Observable<BaseResult<CommitOrder>> buyNowForSettlement(String accountId, String goodsId,
                                                                String num, String skuId, String status,
                                                                String addressId);

        Observable<BaseResult<ConfirOrder>> buyNowForApp(String accountId, String goodsId,
                                                         String num, String skuId, String status,
                                                         String addressId, String couponId);

        Observable<BaseResult<List<Coupon>>> selectUseCoupons(String accountId, String userCouponIds, String goodId, String totalMoney, String companyId);
    }

    interface View extends BaseView {
        void setSuc(CommitOrder commitOrders);

        void setFailed();

        void setPaySuc(ConfirOrder confirOrder);

        void setListCoupon(List<Coupon> coupon);
    }

    abstract class Presenter extends BasePresenter<View, Model> {
        public abstract void buyNowForSettlement(String accountId, String goodsId,
                                                 String num, String skuId, String status,
                                                 String addressId);

        public abstract void buyNowForApp(String accountId, String goodsId,
                                          String num, String skuId, String status,
                                          String addressId, String couponId);

        public abstract void selectUseCoupons(String accountId, String userCouponIds, String goodId, String totalMoney, String companyId);
    }
}
